﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using Orid.Data.SqlServer;

namespace Orid.Management.Statistics.Tools.Decomposition.Data
{
    class DistributeOffline :Distribute
    {
        string connectString, distributesTableName;

        public DistributeOffline()
        {
            connectString = Config.Setting.SettingInstance.DBAddress_Offline;

            //[Distributes]
            distributesTableName = Config.Setting.SettingInstance.Distributes_Offline;
        }

        public override List<Orid.Management.Statistics.Tools.Decomposition.Model.ModelJob> GetJobsFromDistributes(Guid OrderId)
        {
            if (OrderId == null)
            {
                return null;
            }

            try
            {
                return GetJobsFromDistributes(OrderId, connectString, distributesTableName,
                    new AccountOffline(),new UploadJobStoreOffline());
            }
            catch (Exception ex)
            {
                throw ex;
            }

          
        }
    }
}
